# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-pytest-forked
_pyname=pytest-forked
pkgver=1.3.0
pkgrel=0
pkgdesc="extracted --boxed from pytest-xdist to ensure backward compat"
url="https://github.com/pytest-dev/pytest-forked"
arch="noarch"
license="MIT"
depends="py3-pytest"
makedepends="py3-setuptools_scm py3-pbr"
checkdepends="py3-tox"
source="https://files.pythonhosted.org/packages/source/p/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
options="!check" # pytest issues

replaces="pytest-forked" # Backwards compatibility
provides="pytest-forked=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	local _py3ver=$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')
	tox --sitepackages -e py$_py3ver
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="25d639aa43380155d7744f1d05a95e0144f5fe7dea42ff3c2bba3803a07d73b5eb008525469330c5dda14800fe4b611241691be197132f31f88f66930c3ecac0  pytest-forked-1.3.0.tar.gz"
